package com.lengxf.netty.config;

import java.net.URI;
import java.net.URISyntaxException;

public class NettyClientConfig {

    public static URI getServerUri() {
        String serverIp = System.getProperty("userValue.nettyServerIp", "localhost");
        try {
            return new URI(String.format("ws://%s:30001/ws", serverIp));
        } catch (URISyntaxException e) {
            throw new RuntimeException(e.getCause());
        }
    }

    public static Long getDelayTime() {
        String delayTime = System.getProperty("userValue.delayTime", "3");
        return Long.parseLong(delayTime);
    }

}
